#pragma once
#include <httpdownload.h>

#ifndef PROGRESS_H
#define PROGRESS_H




class Progress : public QWidget
{
    Q_OBJECT


private slots:
    void onDownloadProgress(qint64 bytesReceived, qint64 bytesTotal);
    void onDownloadFinished(const QString& filePath);
    void onDownloadError(const QString& errorString);

public:
    Progress(QWidget* parent = nullptr);
    ~Progress();
    void startProgress();
    void updateProgress();
    void resetProgress();

    QProgressBar* embeddedProgress;
    QPushButton* start;
    QPushButton* reset;
    QTimer* taskTimer;
    HttpDownload* download;
    int progressValue = 0;
	QLineEdit* lineEdit;
};
#endif // PROGRESS_H